package cn.corgy.dto;

import lombok.*;

import java.io.Serializable;

/**
 * RPC请求信息
 */
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Builder
@ToString
public class RpcRequest implements Serializable {
    private static final long serialVersionUID = 1905122041950251207L;
    private String requestId;
    private String interfaceName;
    private String methodName;
    private Object[] parameters;
    private Class<?>[] paramTypes;
    private String version;
    private String group;

    //获取zookeeper注册名称
    public String getRpcServiceName() {
        return this.getInterfaceName() +"-"+ this.getGroup() +"-"+ this.getVersion();
    }
}
